package com.mt.restaurant.dao.staff;

import com.mt.common.core.web.base.PageDTO;
import com.mt.restaurant.entity.staff.SalarySettlement;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
@Component(value = "salarySettlementDao")
public interface SalarySettlementDao {

    /**
    * 根据分页参数查询工资结算集合
    *
    * @param pageDTO 分页条件
    */
    public List<SalarySettlement> findSalarySettlements(PageDTO pageDTO);

    /**
    * 查询全部工资结算集合
    *
    */
    public List<SalarySettlement> findAllSalarySettlements();

    /**
    * 查询所有工资结算集合(只提取ID 和 Name)
    *
    */
    public List<SalarySettlement> findAllSalarySettlementsWithIdName();

    /**
    * 根据名称查询工资结算集合(只提取ID 和 Name)
    *
    * @param salarySettlementName 名称
    */
    public List<SalarySettlement> findSalarySettlementsWithIdNameByName(@Param("salarySettlementName") String salarySettlementName);

    /**
    * 根据ID查询指定的工资结算(只提取ID 和 Name)
    *
    * @param salarySettlementId Id
    */
    public SalarySettlement findSalarySettlementsWithIdNameById(@Param(" salarySettlementId") Long salarySettlementId);

    /**
    * 根据分页参数查询工资结算集合的数量
    *
    * @param pageDTO 分页条件
    */
    public Long findSalarySettlementTotalCount(PageDTO pageDTO);

    /**
    * 根据ID查询指定的工资结算
    *
    * @param salarySettlementId Id
    */
    public SalarySettlement findSalarySettlement(@Param("salarySettlementId") Long salarySettlementId);

    /**
    * 根据ID查询指定的工资结算(包含外键)
    *
    * @param salarySettlementId Id
    */
    public SalarySettlement findSalarySettlementWithForeignName(@Param("salarySettlementId") Long salarySettlementId);

    /**
    * 新增工资结算
    *
    * @param salarySettlement 实体对象
    */
    public Long saveSalarySettlement(SalarySettlement salarySettlement);

    /**
    * 更新工资结算
    *
    * @param salarySettlement 实体对象
    */
    public Long updateSalarySettlement(SalarySettlement salarySettlement);

    /**
    * 根据ID删除工资结算
    *
    * @param salarySettlementId ID
    */
    public Long deleteSalarySettlement(@Param("salarySettlementId") Long salarySettlementId);

    SalarySettlement findSalarySettlementByStaffId(@Param("staffId") Long staffId);

    //SalarySettlement findLastSalarySettlement(@Param("staffId") Long staffId);
}
